<!DOCTYPE HTML><html>
    <head>
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="UTF-8">
        <title>index</title>
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" name="viewport">
        <link href="worklight/worklight.css" rel="stylesheet">
        <link href="images/favicon.png" rel="shortcut icon">
        <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
        <link href="css/main.css" rel="stylesheet">
        <script>
		// Define WL namespace.
		var WL = WL ? WL : {};
		/**
		 * WLClient configuration variables.
		 * Values are injected by the deployer that packs the gadget.
		 */
		WL.StaticAppProps = {
   "APP_DISPLAY_NAME": "BarcodeScannerSampleApp",
   "APP_ID": "BarcodeScannerSampleApp",
   "APP_SERVICES_URL": "\/apps\/services\/",
   "APP_VERSION": "1.0",
   "ENVIRONMENT": "android",
   "LOGIN_DISPLAY_TYPE": "embedded",
   "WORKLIGHT_NATIVE_VERSION": "1420749232",
   "WORKLIGHT_PLATFORM_VERSION": "6.1.0.00.20131219-1900",
   "WORKLIGHT_ROOT_URL": "\/apps\/services\/api\/BarcodeScannerSampleApp\/android\/"
};</script>
		<script src="worklight/cordova.js"></script>
		<script src="worklight/wljq.js"></script>
		<script src="worklight/worklight.js"></script>
		<script src="worklight/checksum.js"></script>
		<script>window.$ = window.jQuery = WLJQ;</script>
    </head>
    <body style="display: none;">
    		<!--application UI goes here-->
        <h1>Barcode scanner</h1>
        <button id="scanButton" type="button">Scan</button>
<script>
$('#scanButton').bind('click', doScan);
function doScan(){
    cordova.exec(onScanSuccess, onScanFailure, 'BarcodeScanner', 'scan', []);
}
function onScanSuccess(result) {
  alert("We got a barcode\n" +
        "Result: " + result.text + "\n" +
        "Format: " + result.format + "\n" +
        "Cancelled: " + result.cancelled);
}
function onScanFailure(error) {
  alert("Scanning failed: " + error);
}
</script>
    		<script src="js/initOptions.js"></script>
    		<script src="js/main.js"></script>
    		<script src="js/messages.js"></script>
    </body>
</html>
